<?php defined('BASEPATH') OR exit('No direct script access allowed');

$config = array(

    /**
     * 注册用户验证规则
     */
    'register' => array(
        array(
            'field' => 'name',
            'label' => '×',
            'rules' => 'required|max_length[20]'
        ),
        array(
            'field' => 'email',
            'label' => '×',
            'rules' => 'required|max_length[30]'
        ),
        array(
            'field' => 'psw1',
            'label' => '×',
            'rules' => 'required|min_length[5]'
        ),
        array(
            'field' => 'psw2',
            'label' => '×',
            'rules' => 'required'
        ),
        array(
            'field' => 'code',
            'label' => '×',
            'rules' => 'required|integer'
        ),
    ),

    /**
     * 用户验证规则
     */
    'user' => array(
        array(
            'field' => 'name',
            'label' => '×',
            'rules' => 'required|max_length[20]'
        ),
        array(
            'field' => 'email',
            'label' => '×',
            'rules' => 'required|max_length[30]'
        )
    ),

    /**
     * 博客验证规则
     */
    'blog' => array(
        array(
            'field' => 'title',
            'label' => '×',
            'rules' => 'required|max_length[30]'
        ),
        array(
            'field' => 'intro',
            'label' => '×',
            'rules' => 'required|max_length[50]'
        ),
        array(
            'field' => 'content',
            'label' => '×',
            'rules' => 'required'
        )
    ),

    /**
     * 分类验证规则
     */
    'type' => array(
        array(
            'field' => 'name',
            'label' => '×',
            'rules' => 'required|max_length[10]'
        )
    ),

    /**
     * 评论验证规则
     */
    'comment' => array(
        array(
            'field' => 'content',
            'label' => '×',
            'rules' => 'required|max_length[20]'
        )
    ),
);